package com.roomaja.roomaja.mapper;

import com.roomaja.roomaja.entity.BackgroundPictureEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.sql.Timestamp;
import java.util.List;

@Repository
@Mapper
public interface BackgroundPictureMapper{

    @Select("select * from background_picture")
    @Results({
            @Result(property = "id", column = "id"),
            @Result(property = "imgUrl", column = "img_url"),
            @Result(property = "createTime", column = "create_time", javaType = Timestamp.class),
            @Result(property = "imgType", column = "img_type")}
    )
    List<BackgroundPictureEntity> getAll();


}
